﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace DBProject
{
  /// <summary>
  /// Interaction logic for AddEntry.xaml
  /// </summary>
  public partial class AddEntry : Window
  {
    public PersonDBEntry addedPerson
    {
        get { return addedPerson; }
        set { }
    }
    public AddEntry()
    {
      InitializeComponent();
    }

    private void Button_Click(object sender, RoutedEventArgs e)
    {
        try
        {
            this.addedPerson = new PersonDBEntry() { FirstName = fNameBox.Text, LastName = lNameBox.Text, Age = Convert.ToUInt16(ageBox.Text), Email = mailBox.Text, PhoneNumber = Convert.ToUInt32(pNoBox.Text) };

        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }

    }
  }
}
